﻿namespace Miao.ML
{
	public class BoolData : WinMLData
	{
		public bool value { get; set; }

		public sealed override DataType type => DataType.Bool;

		public static string ToString(object value)
		{
			return value.ToString()!.ToLower();
		}

		public BoolData()
		{
		}

		public BoolData(bool value)
		{
			this.value = value;
		}

		public override void SetValueByText(string text)
		{
			value = bool.Parse(text);
		}

		public override string ToString()
		{
			return ToString(value);
		}
	}
}
